package com.ms.oschina.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ms.oschina.R;

/**
 * 带有多个选项卡滑动的activity：
 * 
 * @author Administrator
 * 
 */
public abstract class BasePagerindicatorActivity extends BaseActivity {

	@Override
	protected int getLayoutId() {
		return R.layout.framepager;
	}

	@Override
	protected void initView() {
		android.support.v4.app.FragmentTransaction transaction = getSupportFragmentManager()
				.beginTransaction();
		transaction.replace(R.id.fl, getFragment());
		transaction.commit();
	}

	protected abstract Fragment getFragment();
}
